clear all
set more off
set maxvar 32000
set matsize 11000
*************************************************************************************************
*set scheme aspen, perm
grstyle init
grstyle set plain, horizontal grid

use "$folder/data/data_ready.dta", clear
cd "$folder/output/figures"
local x=18

xtset state year, yearly delta(2)

label variable growth_gsp "Growth GSP"
label variable log_real1gsppc "Log Real Income per capita"
label variable growth_pc "Growth Real Income per capita"
label variable lestab_D "Growth Number Estabilishments"
label variable lprofits_mill_D "Growth State Profits, Millions"
label variable lcbp_emp_D "Growth Employment"

label variable log_provisions_18 "Legislative Detail"
label variable log_cond_list_prov_18 "Contingent Provisions" 
label variable log_non_cond_list_prov_18 "Non-Contingent Provisions" 
label variable shock_prov18 "Shock to Legislative Detail"
label variable shock_cond_list_prov18 "Shock to Contingencies"
label variable shock_non_cond_list_prov18 "Shock to Non-Contingencies"

label variable gsp_initial "Initial Gross State Product"
label variable growth_initial "Initial GSP Growth"
label variable gsp_pc_initial "Initial GSP per capita"
label variable lestab_D "Growth Number Establishments"
label variable lprofits_mill_D "Growth State Profits, Millions"
label variable lcbp_emp_D "Growth Employment"

*******************
* DESCRIPTIVE
*******************

**** Figure - Binscatter first stage ***
binscatter log_provisions_`x' shock_prov`x', absorb(state) controls(i.year) xtitle(Bartik Shock to Provisions) ytitle(Log Provisions) text(9 -.2 "Slope = -1.10***" "(s.e. = .10)" "F-stat =22.81***" , place(se) just(left) margin(l+4 t+1 b+1) width(25) ) xsize(8)
graph export Figure_2_binscatt_FS.pdf, replace